//
//  NetTool.h
//  FVQuickMessage
//
//  Created by dllo on 16/8/9.
//  Copyright © 2016年 zty. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^successBlock)(id result);
typedef void(^failureBlock)(NSError *error);
typedef NS_ENUM(NSUInteger, TYResponseStyle) {
    FVJSON,
    FVDATA,
    FVXML,
};
typedef NS_ENUM(NSUInteger, TYRequestStyle) {
    FVBodyString,
    FVBodyJSON,
};

@interface NetTool : NSObject
+(void)GET:(NSString *)url body:(id)body response:(TYResponseStyle)responseStyle headerFile:(NSDictionary *)headers success:(successBlock)success failure:(failureBlock)failure;
+(void)POST:(NSString *)url body:(id)body bodtStyle:(TYRequestStyle)bodyStyle
   response:(TYResponseStyle)responseStyle headerFile:(NSDictionary *)headers success:(successBlock)success failure:(failureBlock)failure;
@end
